System and method for storing and retrieving tiled image data

ABSTRACT

System for storing and retrieving tiled image data. System and method store a record in an image file for each tile at a zoom level, create a lookup table for the record, store a null value in the lookup table when there are no tile records at the row and the column of the lookup table, omit a row from the lookup table when there are no tile records in the table row, create an index file having a null value for each omitted rows, and retrieve an address for a specific tile by seeking the row associated with the record in the index file, reading a value, positioning the lookup table according to the index value if the value is non-null, seeking the column associated with the record, reading an address associated with the record, and retrieving the tile associated with the record at the address.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a non-provisional application claiming priority toprovisional application 61/551,112 filed on Oct. 25, 2011 under 35 USC119(e). The entire disclosure of the provisional application isincorporated herein by reference.

BACKGROUND

Systems and methods disclosed herein relate generally to tile-basedmapping systems. The first web-based mapping systems offered rudimentarymapping applications through a web browser. A first type of systemallowed simple map movements by requiring a user to click on navigationarrow buttons surrounding the map view. When a user clicked on an arrow,the map moved a predetermined amount in the direction clicked. Therewere also buttons for zooming in and out. Other map applications allowedusers to drag and draw boxes on the map to relocate the map view. Theseapplications had several disadvantages, including slow rendering anddownloading of map views, because the map view was often represented bya single large image file. Each time the map was moved to the left orright, the entire image was re-rendered and re-sent to the client eventhough only a portion of the image was new. However, the interfaces werewell suited to early web browsers, the map interface could be writtenentirely in HTML or with minimal JavaScript, and since all navigationswere fixed, map servers could cache rendered maps. A second type ofsystem adopted a map view and navigation style similar to desktop GISsystems which used browser plug-in technology and development platformslike Java or Flash.

GOOGLE MAPS® introduced the “slippy map” interface that allows users tomove and zoom the map, and was written in HTML and JavaScript. A keytechnology behind the “slippy map” interface was the concept oftile-based mapping. Mapping applications were made responsive by usingbackground maps that had been broken into smaller tiled images. Thosetiles were stored, already rendered, on a central server. Because theywere already rendered, they could be sent to clients quickly. The tileswere discretely addressed so they could be cached by internet cachingservices and by clients' own browsers. The map images were broken intosmaller pieces so that when users navigated the map view, only the newparts of the map had to be resent from the server.

Tile-based mapping systems are based on multiple discrete zoom levels,each corresponding to a fixed map scale. In tile-based mapping systems,multiple image tiles are used to virtualize a single map view, and imagetiles are accessible using a discrete addressing scheme. Also, intile-based mapping systems, tiled images stored on a server system aresent to a client system with minimal processing, i.e. as much processingis done ahead of time as possible. Optionally, although not required intile-based mapping systems, tile addressing can follow a single globalprojection, tiles can be distributed using a client/server systemarchitecture, and tiles can be organized into relatively few, fixedlayers. Tile images can be of any size, and can vary from map scale tomap scale, or can vary across the same scale or be random in size. Whatis needed is a system to determine which size is most efficient for aspecific purpose.

Referring now to FIG. 1A (PRIOR ART), tiled image sets are created fromcollections of random source images that may have sizes and boundariesthat follow no specific system. Collections of source images can take avariety of forms, for example, high resolution aerial imagery of thefifty largest cities, each represented by a small number (for example5-50) of large source images (for example 10,000×10,000 pixels). Each ofthe source images can be a different size, cover a different portion ofthe earth, or have a different map resolution. Taken together, all thesource images for all the cities form a single map layer. Each layer 12of tile images has multiple scales or levels 14. Every tile set startswith a base scale 221 which is the scale with the highest number andhighest resolution imagery. Each subsequent scale is a lower version ofthe scale preceding it. In the tile creation process, base scale 221(the highest resolution scale) can be completed before lower resolutionscales. Scales 14 include tiles 18 that are addressable by columns 423.Referring now to FIG. 1B (PRIOR ART), exemplary base scale (level 3) 28is the highest resolution scale in the exemplary series including levelone 24 and level two 26, the lowest resolution level (scale) in theseries. What is needed is a multi-processor, memory efficient system tocreate tiled images from source images.

Tiled images are divided into scales, and each scale is divided intorows and columns. The general problem of tile storage is to link atile's address (layer, scale, row, and column) to a binary block ofdata. Tiled images can be stored in computer files on acomputer-readable medium in a separate file for each tiled image,bundled together into larger files, or database tables. Storing manyhundreds or thousands of tiled images in a single file can provideefficiencies that may not be available for other storage means. If thetiled images are written sequentially to a file, retrieval of individualimages can be problematic without a way of knowing which tile addresscorresponds to which tiled image. Tile addresses can be stored with eachimage in the file, but in order to access a specific tiled image, thewhole file is scanned, which could be inefficient. What is needed is asystem for organizing blocks of data into scales, rows, and columns sothat tiled images can be efficiently written to and read from acomputer-readable medium.

SUMMARY

The system and method of the present embodiment address the needs ofdetermining which tile size is most efficient for a specific purpose,providing a multi-processor, memory efficient system to create tiledimages, and providing a data organization scheme so that tiled imagescan be efficiently written to and read from a computer-readable medium.

A first method of the present embodiment for determining the tile sizefor a particular virtualized map view can include, but is not limited toincluding, the steps of generating a plurality of random map views for arandomly-selected scale, calculating a number of tiles needed to filleach of the random map views for a plurality of tile sizes, calculatinga total number of tiles accessed, and a total number of bytes accessedbased on the total number of tiles accessed, to fill each of the randommap views for the plurality of tile sizes, and selecting an optimum tilesize based on minimizing the total number of bytes accessed for the tilesize. The step of selecting an optimum tile size can include, but is notlimited to including, the step of minimizing a decompression time basedon an image format associated with the each of the random map views.

A second method of the present embodiment for converting source imagedata to tile data can include, but is not limited to including, thesteps of (a) selecting at least one source image set, (b) computing ascaling value for the at least one source image set, (c) selecting abase scale for a tile set to be created based on the scaling value, (d)establishing the tile set geographic bounds of the tile set, (e)converting the tile set geographic bounds, (f) for each source imagefrom each of the at least one source image sets (i) determining sourceimage geographic bounds of the source image, (ii) if there is anintersection between the source image geographic bounds and the tile setgeographic bounds, (1) loading the source image from a LRU cache, ifpossible, (2) if the source image is not in the LRU cache, loading thesource image into the LRU cache, (3) extracting image data from thesource image at the intersection, (4) scaling the image data based onthe base scale, (5) storing the scaled image data to a tile storagemechanism, (f) clearing the LRU cache, and (g) repeating steps (a)through (f) for each of the at least one source image sets.

A third method of the present embodiment for storing a dataset of imagetiles can include, but is not limited to including, the steps of (a)determining a number of zoom levels, (b) accessing a plurality ofcluster files including two top cluster files, the two top cluster filesincluding a first subset of the zoom levels, (c) accessing the imagetiles, each of the image tiles having a tile zoom level and a tilelocation, (d) for each of the image tiles, computing a cluster namebased on the tile zoom level and the location, (e) for each of the imagetiles, if a selected cluster file from the plurality of cluster fileshas a name that matches the computed cluster name, (i) computing animage tile pointer for the image tile associated with the computedcluster name, (ii) storing the image tile pointer in a fixed lengthindex in the selected cluster file, and (iii) storing the image tileassociated with the computed cluster name in the selected cluster fileaccording to the image tile pointer, and (f) for each of the imagetiles, if a selected cluster file from the plurality of cluster fileshas a name that does not match the computed cluster name, (i)determining an other subset of the zoom levels, the other subset notincluding the zoom levels of the first subset, (ii) creating a newcluster file as part of the plurality of cluster files, the new clusterfile having a new cluster file index of fixed length, the fixed lengthbased on the other subset of zoom levels, the new cluster fileassociated with the tile location, (iii) computing an image tile pointerfor the image tile associated with the computed cluster name based onthe tile zoom level and the tile location, (iv) storing the image tilepointer in the new cluster file index in the new cluster file, and (v)storing the image tile associated with the computed cluster name in thenew cluster file according to the image tile pointer.

A fourth method of the present embodiment for storing and retrievingtiled image data can include, but is not limited to including, the stepsof for each of a plurality of tiles at a pre-selected zoom level fromthe tiled image data, storing a tile record in a tiled image file, thetile record being associated with a row and a column, creating a lookuptable having a direct-lookup value for the tiled record at the row andthe column associated with the tiled image, when there are none of thetile records at the row and the column of the lookup table, storing anull value in the lookup table at the row and the column, when there arenone of the tile records in a lookup table row in the lookup table,omitting the lookup table row from the lookup table, creating a rowindex file having a null value for each of the omitted lookup tablerows, and retrieving an address for a specific tile by executing thesteps including, but not limited to seeking to a row position of the rowassociated with the tile record in the row index file, reading a rowindex value at the position, positioning the tile index file accordingto the row index value if the value is non-null, seeking to a columnposition for the column associated with the tile record, reading anaddress associated with the tile record, and retrieving the tile recordat the address.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1A PRIOR ART is a hierarchical block diagram of layers, scales,columns, and tiles;

FIG. 1B PRIOR ART is a pictorial diagram of three zoom levels;

FIG. 2 is a pictorial diagram of the earth mapped to a two-dimensionalsurface, and with a grid overlain upon the surface;

FIG. 3A is a pictorial diagram of a geodetic projection overlain with atile scheme;

FIG. 3B illustrates equations that relate a tile address to a geographicbounding rectangle;

FIG. 4A illustrates an equation to compute dots per pixel;

FIG. 4B is a table relating zoom levels to a number of tiles and dotsper pixel;

FIG. 5 is a schematic diagram of a virtualized map view and wastedpixels;

FIG. 6 is a table relating image size to format overhead;

FIG. 7A is a schematic block diagram of the system of the presentembodiment for determining tile size;

FIG. 7B is a flowchart of the method of the present embodiment fordetermining tile size;

FIG. 8A is a software code listing for a random map center algorithm;

FIG. 8B is a software code listing for a random map view generatoralgorithm;

FIG. 9A is a table relating tile size to wasted pixels;

FIG. 9B is a graph of tile size versus wasted pixels for a 1024×768 mapview;

FIG. 10A is a graph of tile size versus bytes accessed for severaldifferent map view sizes;

FIG. 10B is a graph of tile size versus tiles accessed for severaldifferent map views sizes;

FIG. 11A is a table relating tile size to decode time for two commonlyused formats;

FIG. 11B is a graph of tile size versus decode time;

FIG. 12A is a schematic block diagram of the system of the presentembodiment for converting source image data to tile data;

FIG. 12B is a flowchart of the method of the present embodiment forconverting source image data to tile data;

FIGS. 13A-1, 13A-2, 13B-1, 13B-2, 14-1, and 14-2 are exemplary softwarecode and data type definitions for creating a base scale of a tile setand for creating lower resolution scales;

FIG. 15A is a schematic block diagram of the system of the presentembodiment for storing image tiles;

FIG. 15B is a flowchart of the method of the present embodiment forstoring image tiles;

FIG. 16A is a hierarchical diagram of tiled image layers;

FIG. 16B is a pictorial representation of the world divided intoclusters;

FIG. 16C is a hierarchical diagram of a five-level cluster;

FIG. 17A illustrates equations for computing the number of tiles for atile set with a specific number of layers,

FIG. 17B is a table presenting the structure of the index file and thestructure of the time image section;

FIG. 18A is a hierarchical diagram of levels and their associatedclusters;

FIG. 18B is the hierarchical diagram of FIG. 18A illustrating inaddition storage of the top image

FIG. 19A illustrates the structure of the tiled image file of thepresent embodiment;

FIG. 19B illustrates the structure of the tile index file and thestructure of the row index file of the present embodiment;

FIGS. 20A-1, 20A-2, 20B-1, 20B-2, 20C-1, and 20C-2 are software codelisting for tile output code and tile input code;

FIG. 21A is a schematic block diagram of the system of the presentembodiment for storing and retrieving tiled image data; and

FIG. 21B is a flowchart of the method of the present embodiment forstoring and retrieving tiled image data.

DETAILED DESCRIPTION

The problems set forth above as well as further and other problems aresolved by the present teachings. These solutions and other advantagesare achieved by the various embodiments of the teachings describedherein below.

Referring now to FIG. 2, tile-based mapping systems map positions on theearth 11 to a two-dimensional surface 13 and divide that surface into aseries of regularly spaced grids 15. Map tiles are discretely addressed,and a translation method between tile addresses and a continuousgeospatial coordinate system is defined. This logical tile scheme formsa multi-resolution, regularly spaced grid that is tied to a singletwo-dimensional map projection which allows a tiled image to be accesseddirectly with discrete coordinates. For example, instead of requesting amap image with a bounding rectangle delineated with continuous realnumbers like [−100.0, 30.00] to [−80.0, 40.0], a tile can be requestedfrom a grid with zoom level, column, and row addresses delineated withdiscrete integer values.

Referring now to FIG. 3A, there is a mapping between the address of atile to the geospatial coordinates for the area covered by the tile. Onepossible way to do this, for example, is to start with a geodeticprojection which portrays the earth as a rectangle 360° wide and 180°tall. In this case, the base projection and the logical tile scheme have2-to-1 aspect ratios. At zoom level one 17, the logical tile scheme hasone row and two columns. Each subsequent zoom level, for example, zoomlevel two 19, has double the number of rows and columns and four timesthe number of tiles as the previous zoom level. At each increase in zoomlevel, each tile is divided into four sub-tiles. Although there is notheoretical maximum number of zoom levels, the practical limit istwenty. The number of columns for a zoom level i is 2^(i) and the numberof rows is 2^(i−1). Referring now to FIG. 3B, the tile address can berelated to a geographic bounding rectangle as per equations 21 and 23.

Referring now to FIG. 4A, before utile set can be created from a set ofrandom source images, the base scale or a target base scale can bechosen to substantially match the resolution of the source imagesbecause a given set of random source images may not match exactly one ofthe predetermined scale resolutions. Degrees per pixel (DPP) 25 can beused to choose base scales for sets of source images. Information aboutthe sources images, such as image width and height in pixels, andminimum and maximum vertical and horizontal coordinates in degree, areused in the present embodiment to convert the source image to a tileset. DPP 25 can be computed by combining the vertical and horizontaldimensions of the image when tiled image projections preserve the sameDPP in each dimension as the logical tile scheme and when thecalculations are performed in degrees. Referring now to FIG. 4B, zoomlevels (scales) 309 in an example logical tile scheme with 512×512 pixeltiles are shown. Source images stored in other projections might usemeters for the coordinate system, requiring a conversion to degrees, Forexample, is a set of source images has a DPP of 0.03, this falls betweenscales 4 and 5. If scale 4 is chosen, the sources images will be scaleddown and data will be lost. If scale 5 is chosen, the source images willbe scaled up, preserving all data, but requiring more storage space. Asan example, if the source image set is 10 million bytes uncompressed andhas a DPP value of 0.03, when converted to scale 4, the source imagewill be 4.66 million bytes, and when converted to scale 5 will be 18.645million bytes. After the tiled images for the base scale have beencreated, the lower resolution scale tiled images can be created.

When a user moves a map, a tiled mapping client can calculate whichtiles are necessary to fill the map, can fetch the tiles, and can stitchthe tiles together on the map. A map is defined by both geographic areaand pixel area. To calculate which tiles to retrieve, if the clientsupports only discrete map scales, the client need only know the currentzoom level, the tile index of the origin of the map, and the number oftiles required to fill the map. To provide the tiles, however, sourceimages must be converted to tiles, and for this, a determination of themost efficient tile size is needed.

Each raster image is a grid of pixels, and each pixel represents thecolor of the image at a point in the image. Pixel values are expressedin units of the image's color space, or the abstract model thatdescribes how color components can be represented, e.g. the RGB(red-green-blue) model requires that color components for red, green,and blue be stored as separate values for each pixel. The RGB componentsare usually stored as single byte values, i.e. integer values from 0 to255, in a 4-byte integer word. Raster image pixels are addressable usingtwo-dimensional coordinates with an orthogonal coordinate system overthe image. Cartesian coordinates can be used for a mapping coordinatesystem, where the center of the coordinate space is (0, 0). Rasterimages can be stored in formats that can be distinguished by how theyhandle compression issues, for example, JPEG (lossy compression), PNG(lossless compression), and BMP, PPM, PGM, and PBM (no compression).There are also file formats that have been adapted for storinggeospatial images, for example, MrSID (LIZARDTECH®), JPEG2000, andGEOTIFF. Source images can be scaled because tiled images are stored infixed resolutions that are unlikely to match source image resolutions.Image scaling is a type of interpolation for which there are commonalgorithms such as, for example, but not limited to, nearest neighbor,bilinear, and bicubic.

Referring now to FIGS. 5 and 6, each image has overhead including theoverhead of multiple seeks and reads from a file system, unevenutilization of the file system's native block size, and the header andother overhead storage space within each image file. Common imageformats such as PEG and PNG contain header information and imagemetadata, and “wasted pixels” 123 (FIG. 5), pixels that are transmittedbut are not part of the map view 43 (FIG. 5). For a particular imagesize 11 (FIG. 6), JPEG format contains PEG bytes 33 (FIG. 6) and PEGoverhead percentage 37 (FIG. 6). Likewise, for a particular image size11, PNG contains PNG bytes 35 (FIG. 6) and PGN overhead percentage 39(FIG. 6). Clearly, lossy JPEG compression leads to a higher relativeoverhead than lossless PNG compression. Using images that are largeenough to reduce image overhead, but not so large as to consume too muchmemory, or require too much time to load the image, can provide optimumresponse time. A goal can be to minimize the number of individual imagesrequired to virtualize the map view and at the same time minimize thenumber of wasted pixels 123 (FIG. 5).

Referring now primarily to FIG. 7A, system 100 of the present embodimentfor determining the tile size for a particular virtualized map view caninclude, but is not limited to including, map view generator 101generating a plurality of random map views for a randomly-selectedscale, tile calculator 103 calculating a number of tiles needed to filleach of the random map views for a plurality of tile sizes, a totalnumber of tiles accessed 119 (FIG. 9A), and a total number of bytesaccessed based on the total number of tiles accessed, to fill each ofthe random map views for the plurality of tile sizes, and tile sizeselector 105 selecting an optimum tile size based on minimizing thetotal number of bytes accessed for the tile size. Tile size selector 105can optionally minimize a decompression time based on an image formatassociated with the each of the random map views. Optionally, system 100can include, but is not limited to including, pixel scalar 107 scalingpixels in each of the tiles to match the randomly selected scale,calculating a wasted pixel number 123 (FIG. 9A) of scaled pixels fromthe tiles that are partially outside the random map views for each of aplurality of preselected tile sizes, and selecting the optimum tile sizebased on minimizing the wasted pixel number 123. Map view generator 101can include, but is not limited to including, center generator 109generating random center locations, and for each of the plurality oftile sizes, generating a map view by starting at a center location andextrapolating to a 2-d map view. Center generator 109 can furtheroptionally select the center locations from −180 to +180 longitude and−90 to +90 latitude. Tile calculator 103 can include, but is not limitedto including, wasted tile calculator computing wasted tiles as the tilesbeyond earth boundaries of the random map views, and computing the totalnumber of tiles accessed based on the wasted tiles.

Referring now primarily to FIG. 7B, method 150 of the present embodimentfor determining the tile size for a particular virtualized map view caninclude, but is not limited to including, the steps of generating 151 aplurality of random map views for a randomly-selected scale, calculating153 a number of tiles needed to fill each of the random map views for aplurality of tile sizes, calculating 155 a total number of tilesaccessed 119 (FIG. 9A), and a total number of bytes accessed based onthe total number of tiles accessed, to fill each of the random map viewsfor the plurality of tile sizes, and selecting 157 an optimum tile sizebased on minimizing the total number of bytes accessed for the tilesize. The step of selecting an optimum tile size can include, but is notlimited to including, the step of minimizing a decompression time basedon an image format associated with the each of the random map views.Optionally, method 150 can include, but is not limited to including, thesteps of scaling pixels in each of the tiles to match the randomlyselected scale, calculating a wasted pixel number 123 (FIG. 9A) ofscaled pixels from the tiles that are partially outside the random mapviews for each of a plurality of preselected tile sizes, and selectingthe optimum tile size based on minimizing wasted pixel number 123 (FIG.9A). The step of generating a plurality of random map views can include,but is not limited to including, the step of generating random centerlocations, and for each of the plurality of tile sizes, generating a mapview by starting at a center location and extrapolating to a 2-d mapview. Method 150 can further optionally include the step of selectingthe center locations from −180° to +180° longitude and −90° to +90°latitude. The step of calculating a total number of tiles accessed caninclude, but is not limited to including, the steps of computing wastedtiles 123 (FIG. 9A) as the tiles beyond earth boundaries of the randommap views, and computing the total number of tiles accessed 119 (FIG.9A) based on the wasted tiles.

For example, for a map scale defined as having 2¹⁰ (1024) columns by 2⁹(512) rows, each tile is 1024/360:0 (2:84) degrees wide and long. Sinceall map views have the same aspect ratio, to generate random map views,a number of random center locations can be generated. For each tilesize, the map view bounds can be extrapolated from the center location.In some cases, a portion of the map view might go beyond the normalbounds of the earth, for example, the longitude might be greater than180° or less than −180°. In these cases, the randomization function canbe constrained, or wasted pixels and tiles 123 can be computed as ifthey were legitimate pixels and tiles. In the latter case, the “wastedpixels” 123 can be used to perform wrapping in the boundary areas.

Referring now primarily to FIG. 8A, random map center algorithm 45 cangenerate 10,000 randomized map center locations for scale 10 and tiledimensions of 16, 32, 64, 128, 256, 512, 1024, and 2048. Random mapcenter algorithm 45 can compute the total number of tiles accessed 119(FIG. 9A) and the wasted pixels 123 (FIG. 9A) for each access. Referringnow to FIG. 8B, random map view generator algorithm 47 is an example ofhow to randomly generate full map views by choosing a single x,y pointand extrapolating to a two dimensional map view. Referring now to FIG.9A, results are shown in the form of tiles accessed 119 and wastedpixels 123 for a 1024×768 map view in which 10,000 random map views areaveraged, for various tile sizes 49. Referring now to FIG. 9B, tile sizeversus tiles accessed graph 55 of the normalized number of tilesaccessed 119 (FIG. 9A) and of pixels wasted 123 (FIG. 9A) is shown. Asshown, 16×16 tiles require the most bytes to be read, but generaterelatively few wasted pixels 123. Tile sizes 128, 256, and 512 areclosest to optimum tile size 125 (FIG. 7A) for this example.

Referring now primarily to FIG. 10A, tile size versus bytes accessed 121(FIG. 7A) graph 57 for map resolutions 640×480, 800×600, 1024×768,1280×960, 1400×1050, and 1600×1200 are shown. As shown, optimum tilesizes 125 (FIG. 7A) are 128, 256, and 512. Referring to FIG. 10B, JPEGbytes accessed versus differences from one tile size to another graph 59is shown. The substantially flat line between tile size 256 and tilesize 512 indicates that there is little difference between the totalbytes accessed for tile sizes 256 and 512.

Referring now to FIG. 11A, decode time table 61 presents the computationtime required to decompress compress tiles images is shown as averagedecode times for tiles of varied sizes in both JPEG and PNG formats, andshown in FIG. 11B, tile size versus total decode time graph 63 shows avariety of map resolutions as above. The minimum computation time isshown to be for tile size 512. If, in these examples, the fixed mapscale is replaced with a randomly selected map scale chosen from acontinuous range instead of fixed discrete scales, the pixels can bescaled to match the scale of the map view with the randomly chosenscale.

Pull-based and push-based are iteration schemes available for creatingtiles from random source images. In pull-based tile creation, tiles areiterated over and source image data are pulled from source images foreach tile. In push-based tile creation, source images are iterated overand source image data are pushed from each source image to image tiles.To reduce the amount of memory needed for creating tiles, the pull-basedscheme with a memory cache of source images can be used. In particular,in the present embodiment, a least recently used (LRU) cache of decodedsource images is constructed in memory. If an element is added to analready-full cache, the least recently used element will be discarded.Each time a source image is accessed, the system of the presentembodiment checks the LRU cache first for the source image, and only ifthe source image is not in the LRU cache is it read, decoded, and placedin the LRU cache. Tiles can be iterated over in geographic order. Sincesource images affect groups of tiles that border each othergeographically, a substantial percentage of the source image accessescould be from the LRU cache.

Referring now to FIG. 12A, system 200 for converting source image datato tile data can include, but is not limited to including, image setselector 201 selecting at least one source image set 217, scaling valueprocessor 203 computing a scaling value 219 for the at least one sourceimage set 217, base scale selector 205 selecting a base scale 221 for atile set to be created based on scaling value 219, geographic boundsprocessor 207 establishing tile set geographic bounds 223 of the tileset, tile set converter 209 converting tile set geographic bounds 223,and source image processor 211 performing the following steps for eachsource image 225 from each of the at least one source image sets 217:(i) determining source image geographic bounds 227 of source image 225,(ii) if there is an intersection between the source image geographicbounds 227 and tile set geographic bounds 223, (1) loading source image225 from a LRU cache, if possible, (2) if source image 225 is not in theLRU cache, loading source image 225 into the LRU cache, (3) extractingimage data from source image 225 at the intersection, (4) scaling theimage data based on base scale 221, (5) storing scaled image data 229 totile storage mechanism 231. System 200 also includes LRU cache processorclearing the LRU cache, and loop processor 215 activating each elementof system 200 for each of the at least one source image sets 217. Basescale selector 205 can choose base scale 221 to substantially match theresolution of source image 225. System 200 can optionally include asource image accessor accessing an image width in pixels of source image225, an image height in pixels of source image 225, and the minimum andmaximum vertical and horizontal coordinates in degrees of source image225. Tile set geographic bounds 223 can be based on source imagegeographic bounds 22T System 200 can optionally include a memory cachecaching tile sets in memory to improve performance. Source imageaccessor 217 can partially read source images 225. System 200 canoptionally include a tile creation algorithm processor multi-threadingthe tile creation algorithms and using tile creation algorithms fordistributed computing. System 200 can optionally include a partialupdate processor partially updating existing tile sets.

Referring now to FIG. 12B, method 250 for converting source image datato tile data can include, but is not limited to including, the steps of(a) selecting 251 at least one source image set, (b) computing 253 ascaling value for the at least one source image set, (c) selecting 255 abase scale for a tile set to be created based on the scaling value, (d)establishing 257 the tile set geographic bounds of the tile set, (e)converting 259 the tile set geographic bounds, (f) for each 261 sourceimage from each of the at least one source image sets (i) determiningsource image geographic bounds of the source image, (ii) if there is anintersection between the source image geographic bounds and the tile setgeographic bounds, (1) loading the source image from a LRU cache, ifpossible, (2) if the source image is not in the LRU cache, loading thesource image into the LRU cache, (3) extracting image data from thesource image at the intersection, (4) scaling the image data based onthe base scale, (5) storing the scaled image data to a tile storagemechanism, (g) clearing 263 the LRU cache, and (h) repeating 265 steps(a) through (g) for each of the at least one source image sets. The stepof selecting a base scale can include, but is not limited to including,the step of choosing the base scale to substantially match theresolution of the source data. Method 250 can further include the stepsof accessing an image width in pixels of the source image, an imageheight in pixels of the source image, and the minimum and maximumvertical and horizontal coordinates in degrees of the source image. Thetile set geographic bounds can be based on the source image geographicbounds. Method 250 can include, but is not limited to including, thesteps of caching tile sets in memory to improve performance, partiallyreading the source images, multi-threading the tile creation algorithms,using tile creation algorithms for distributed computing, and partiallyupdating existing tiled image sets.

Referring now to FIGS. 13A-1, 13A-2, 13B-1, 13B-2, 14-1, and 14-2,exemplary and data type definitions 65 and tile set creation code 67 andlower resolution scales creation code 69 for executing the steps ofmethod 250 (FIG. 13B) are shown. TileAddress.getBoundingBox( ) providesthe bounding coordinates in degrees for an image tile address.“BoundingBox.intersects( ) tests if two bounding boxes intersect eachother. BoundingBox.union( ) is used to combine multiple bounding boxesinto a single one. The abstract method writeTile is used to provide ageneric means for storing tiles. Additional abstract methodsgetSourcelmageData and putSourcelmageData are used to provide access tothe LRU source image cache. The constant TILE_SIZE represents the widthand height of the tiled images, and is the name for the horizontal andvertical dimensions. Exemplary tile set creation Java code 67 is shownfor creating a base scale of a tile set (single-threaded) (FIG. 13A) andexemplary lower resolution scales creation Java code 69 (FIG. 14). Lowerresolution scales can be constructed directly and exactly from fourtiles from the previous scale as follows. For each scale from a basedscale −1 to 1, (1) determine the bounds of the current tile scale intile coordinates, (2) initialize the tile storage mechanism, (3) iterateover the tile set coordinates, i.e. for each tile (a) determine the fourtiles from the higher scale that contribute to the current tile, (b)retrieve the four tile images, or as many as exist, (c) combine the fourtile images into a single, scaled-down image, (d) save the completedtiled image to the tile storage mechanism, and (e) finalize the tilestorage mechanism. To implement the previous set of steps, the typesdefined in the previous section can be used, as well as abstract classTileInputStream {abstract Bufferedlmage getTile{TileAddress address};}This type can allow reading of the tiles from previous scales, assumingthat TileInputStream and TileOutputStream are linked somehow to allowwriting tiles in one stage and reading them in another stage. Forexample, when creating scale 7, scale 7 tiles can be written toTileOutputStream, and then read when scale 6 is created.

Because reading from and writing to disk can be time-consuming steps inthe tile creation process, following are optional optimizations that canminimize both of these. For example, if there is enough memory to storea significant subset of the tiled images, the source images can belooped through, read only once each, and the data from the source imagescan be applied to the tiled images. When all source images have beenread, the tiled images can be stored in memory so that they may beaccessed when creating the lower resolution scales. If there is notenough memory to hold the complete tile set uncompressed, the tile setscan be subdivided into, for example, but not limited to, geographicareas. Memory-based tile creation can include, but is not limited toincluding, the steps of (1) choosing a base scale for the tile set, (2)deterring the geographic bounds of the tile set (this can be based onthe bounds of the source images), (3) determining the bounds of the tileset in tile coordinates, (4) initializing the tile cache, (5) iteratingover the source images, for each source image (a) computing the boundsof the source image in tile coordinates, (b) reading the source imageinto memory, (c) iterating over the tile set coordinates, for each tile(i) computing the geographic bounds of the tile, (ii) checking the cachefor the tile image, if it is not in the cache, creating an empty imageand putting it in the cache, (iii) extracting the required image datafrom the source image and storing it in the tied image, (6) for eachscale from base scale −1 to 1, (a) determining the bounds of the currenttile scale in tile coordinates, (b) iterating over the tile setcoordinates, for each tile (i) determining the four tiles from thehigher scale that contribute to the current tile, (ii) retrieving thefour tile images from the cache, or as many as exist, and (iii)combining the four tile images into a single, scaled-down image.

To organize blocks of data into scales, rows, and columns so that tiledimages can be efficiently written to and read from disk, data aredivided into clusters in which there are a fixed number of tiles. Theclusters, in turn, are divided into multiple levels. Tiles are storedsequentially in a single file, but not in any particular order becausethey are indexed. The cluster in which a given tile should be placed canthen be determined.

Referring now to FIG. 15A, system 300 for storing a dataset of imagetiles can include, but is not limited to including, zoom level processor301 determining a number of zoom levels 309, cluster file processor 303accessing a plurality of cluster files 313 including two top clusterfiles, the two top cluster files including a first subset of the zoomlevels 309, image tile processor 305 accessing image tiles 317, eachimage tile 317 having a tile zoom level and a tile location. For eachimage tile 317, image tile processor 305 computes a cluster name 319based on tile zoom level 309 and the tile location. For each image tile317, if a selected cluster file 313 from the plurality of cluster fileshas a name that matches the computed cluster name, tile pointerprocessor 307 computes an image tile pointer for the image tileassociated with the computed cluster name, stores the image tile pointerin a fixed length index in the selected cluster file, and stores theimage tile associated with the computed cluster name in the selectedcluster file according to the image tile pointer. For each of the imagetiles, if a selected cluster file from the plurality of cluster fileshas a name that does not match the computed cluster name, zoom levelprocessor 301 determines an other subset of the zoom levels, the othersubset not including the zoom levels of the first subset, cluster fileprocessor 303 creates a new cluster file as part of the plurality ofcluster files, the new cluster file having a new cluster file index offixed length, the fixed length based on the other subset of zoom levels,the new cluster file associated with the tile location, tile pointerprocessor computes an image tile pointer for the image tile associatedwith the computed cluster name based on the tile zoom level and the tilelocation, and stores the image tile pointer in the new cluster fileindex in the new cluster file, and image tile processor 305 stores theimage tile associated with the computed cluster name in the new clusterfile according to the image tile pointer. Zoom level processor 301optionally determines a lowest zoom level in the other subset of zoomlevels. Image tile processor 305 optionally copies each of the tileimages at the lowest zoom level from each of the new cluster files, andstores each of the copied tiled images into the two top cluster filesbased on the tile location.

Referring now to FIG. 15B, computer-implemented method 350 for storing adataset of image tiles can include, but is not limited to including, thesteps of (a) determining 351 a number of zoom levels, (b) accessing 353a plurality of cluster files including two top cluster files, the twotop cluster files including a first subset of the zoom levels, (c)accessing 355 the image tiles, each of the image tiles having a tilezoom level and a tile location, (d) for each of the image tiles,computing 357 a cluster name based on the tile zoom level and thelocation, (e) for each 359 of the image tiles, if a selected clusterfile from the plurality of cluster files has a name that matches thecomputed cluster name, (i) computing an image tile pointer for the imagetile associated with the computed cluster name, (ii) storing the imagetile pointer in a fixed length index in the selected cluster file, and(iii) storing the image tile associated with the computed cluster namein the selected cluster file according to the image tile pointer, and(f) for each 361 of the image tiles, if a selected cluster file from theplurality of cluster files has a name that does not match the computedcluster name, (i) determining an other subset of the zoom levels, theother subset not including the zoom levels of the first subset, (ii)creating a new cluster file as part of the plurality of cluster files,the new cluster file having a new cluster file index of fixed length,the fixed length based on the other subset of zoom levels, the newcluster file associated with the tile location, (iii) computing an imagetile pointer for the image tile associated with the computed clustername based on the tile zoom level and the tile location, (iv) storingthe image tile pointer in the new cluster file index in the new clusterfile, and (v) storing the image tile associated with the computedcluster name in the new cluster file according to the image tilepointer. Method 300 can optionally include the steps of determining alowest zoom level in the other subset of zoom levels, copying each ofthe tile images at the lowest zoom level from each of the new clusterfiles, and storing each of the copied tiled images into the two topcluster files based on the tile location.

Referring now to FIG. 16A, tiled image layers follow pyramid typestructure 71. Each level has four times the number of tiles as itspredecessor. Each lower resolution level is based on the image data fromthe next higher resolution level. Referring now to FIG. 16B, the clustergrouping system of the present embodiment starts by dividing the worldinto clusters 73, that is, (0, 0), and (0, 1). Referring now to FIG.16C, the structure of five-level cluster 75 is shown. The tiles thatfall into the area marked by address (0, 0) are stored in cluster (0, 0)and all the tiles that fall into the area marked by address (0, 1) arestored in cluster (0, 1). In this embodiment, no tiles overlap bothclusters.

Referring now to FIG. 17A, tile set equation 77 computes the number oftiles for a tile set with L levels, and cluster equation 79 computes thenumber of tiles for a cluster with L levels. To store tiles in clusterfiles, the number of levels to be stored is determined. For example,with a base level of seven, two cluster files are needed, each withseven levels of tiles and 5,461 tiles. Because the possible number oftiles is fixed for each cluster, a single fixed length lookup index canbe built and stored at the beginning of the cluster file. The index sizeis the number of possible tiles times the size of the tile addressrecord. After the index, the tile images can be stored sequentially inthe file. Because there is an index, there is no need to store the tilesin any particular order. Referring now to FIG. 17B, index section 81 andtime image section 83 can be included in a file structure for anexemplary cluster file.

Referring now to FIG. 18A, the present embodiment also accommodatesmultiple levels of clusters with each level covering a continuoussub-range of levels. For example, utile set with fifteen scales has twolevels of clusters. First level 85 includes tile levels 1-7, while thesecond level 87 of clusters includes tile levels 8-15. First level 85includes seven levels, while second level 87 includes eight scales.First level 85 of clusters can only have two clusters, while secondlevel 87 of clusters can include as many clusters as there are tiles inthe first tile level of the second cluster level, in the previousexample, tile level eight, or 32,768 clusters. In one embodiment,cluster files are only created when there are tiles that belong in thecluster, so that the actual required number of clusters can fluctuatebased on the size of the tile set. Referring now to FIG. 18B, tominimize the number of times a file is opened, closed, and accessed, toplevel image 89 for a subordinate cluster can be duplicated in the firstlevel cluster.

Referring to FIG. 19A, all tiles for a specific zoom level (see FIG. 3A)can be stored in a single file. For each zoom level, there is tiledimage file 421 for the tiled images, and there are tiled index file 95and row index file 411 into the zoomed image file. System 400 (FIG. 21A)of the present embodiment can store a sentinel value, the tile'saddress, and the tile's size along with the tiled image datasequentially in tiled image file 421. Referring now to FIG. 19B, thesystem can store only rows in tiled index file 95 in which there aretiles, and can create row index file 411 having either the location ofthe row's index records from tiled index file 95 if the row has anytiles, or a null value if the row has no tiles, for each row. Toretrieve the address for a specific tile, system 400 (FIG. 21A) can seekto the position of the row pointer in row index file 411, read thevalue, and use the value to position tiled index file 95 if the value isnon-null. Further system 400 can seek additional positions for thecolumn index and reading the tile address. Since the tiles do not haveto be stored in any particular order, tiles can be written over a periodof time, and new tiles can be added to the file by writing them at theend of the file. Referring now to FIGS. 20A-1, 20A-2, 20B-1, 20B-2,20C-1, and 20C-2, exemplary tile output code 97 (FIG. 20A-1) andexemplary tile input code 99 (FIG. 20B-2) are the Java code for indexedtile output by zoom level and tile input, respectively.

Referring now to FIG. 21A, system 400 for storing and retrieving tiledimage data can include, but is not limited to including, tile recordprocessor 401 executing, for each of a plurality of tiles at apre-selected zoom level from the tiled image data, the step of storingtile record 403 in tiled image file 421, tile record 403 beingassociated with row 419 and column 423. System 400 can also includelookup table processor 407 creating lookup table 418 having adirect-lookup value for tile record 403 at row 419 and column 423associated with the tiled image, when there are no tile records 403 atfirst row 417 and column 423 of lookup table 418, storing a null valuein lookup table 418 at row 419 and column 423, when there are no tilerecords 403 in a lookup table row in lookup table 418, omitting thelookup table row from lookup table 418. System 400 can still furtherinclude row index file creator 409 creating row index file 411 having anull value for each of the omitted lookup table rows, and tile retriever413 retrieving an address for a specific tile by executing the stepsincluding, but not limited to seeking to a row position of row 419associated with tile record 403 in row index file 411, reading row indexvalue 417 at the position, positioning the tile index file according tothe row index value 417 if the value is non-null, seeking to a columnposition for column 423 associated with tile record 403, reading anaddress associated with tile record 403, and retrieving tile record 403at the address. Tile record 403 can include, but is not limited toincluding, a sentinel value, a tile address, a tile size, and a tiledimage. Tile record processor 401 can optionally compute the addressbased on a column index, a row index, and a number of columns.

Referring now to FIG. 21B, method 450 for storing and retrieving tiledimage data can include, but is not limited to including, the steps offor each of a plurality of tiles at a pre-selected zoom level from thetiled image data, storing a tile record in a tiled image file, the tilerecord being associated with a row and a column, creating a lookup tablehaving a direct-lookup value for the tiled record at the row and thecolumn associated with the tiled image, when there are none of the tilerecords at the row and the column of the lookup table, storing a nullvalue in the lookup table at the row and the column, when there are noneof the tile records in a lookup table row in the lookup table, omit thelookup table row from the lookup table, creating a row index file havinga null value for each of the omitted lookup table rows, and retrievingan address for a specific tile by executing the steps including, but notlimited to seeking to a row position of the row associated with the tilerecord in the row index file, reading a row index value at the position,positioning the tile index file according to the row index value if thevalue is non-null, seeking to a column position for the columnassociated with the tile record, reading an address associated with thetile record, and retrieving the tile record at the address. The tilerecord can include, but is not limited to including, a sentinel value, atile address, a tile size, and a tiled image. Method 450 can optionallyinclude the step of computing the address based on a column index, a rowindex, and a number of columns.

Embodiments of the present teachings are directed to computer systemsfor accomplishing the methods discussed in the description herein, andto computer readable media containing programs for accomplishing thesemethods. The raw data and results can be stored for future retrieval andprocessing, printed, displayed, transferred to another computer, and/ortransferred elsewhere. Communications links can be wired or wireless,for example, using cellular communication systems, militarycommunications systems, and satellite communications systems. In anexemplary embodiment, the software for the system is written in FORTRANand C. The system operates on a computer having a variable number ofCPUs. Other alternative computer platforms can be used. The operatingsystem can be, for example, but is not limited to, WINDOWS® or LINUX®.

The present embodiment is also directed to software for accomplishingthe methods discussed herein, and computer readable media storingsoftware for accomplishing these methods. The various modules describedherein can be accomplished on the same CPU, or can be accomplished on adifferent computer. In compliance with the statute, the presentembodiment has been described in language more or less specific as tostructural and methodical features. It is to be understood, however,that the present embodiment is not limited to the specific featuresshown and described, since the means herein disclosed comprise preferredforms of putting the present embodiment into effect.

Referring again primarily to FIGS. 7B, 12B, 15B, and 21B, methods 150,250, 350, and 450 can be, in whole or in part, implementedelectronically. Signals representing actions taken by elements ofsystems 100 (FIG. 7A), 200 (FIG. 12A), 300 (FIG. 15A), and 400 (FIG.21A) and other disclosed embodiments can travel over at least one livecommunications network. Control and data information can beelectronically executed and stored on at least one computer-readablemedium. The system can be implemented to execute on at least onecomputer node in at least one live communications network. Common formsof at least one computer-readable medium can include, for example, butnot be limited to, a floppy disk, a flexible disk, a hard disk, magnetictape, or any other magnetic medium, a compact disk read only memory orany other optical medium, punched cards, paper tape, or any otherphysical medium with patterns of holes, a random access memory, aprogrammable read only memory, and erasable programmable read onlymemory (EPROM), a Flash EPROM, or any other memory chip or cartridge, orany other medium from which a computer can read. Further, the at leastone computer readable medium can contain graphs in any form including,but not limited to, Graphic Interchange Format (GIF), Joint PhotographicExperts Group (JPEG), Portable Network Graphics (PNG), Scalable VectorGraphics (SVG), and Tagged Image File Format (TIFF).

The invention has been described with reference to certain embodiments.It will be understood, however, that the invention is not limited to theembodiments discussed above, and that modification and variations arepossible within the scope of the appended claims.

What is claimed is:
 1. A method for storing and retrieving tiled imagedata comprising: for each of a plurality of tiles at a pre-selected zoomlevel from the tiled image data, storing a tile record in a tiled imagefile, the tile record being associated with one of the plurality oftiles, the tile record being associated with a row and a column;creating a lookup table having a direct-lookup value for the tile recordat the row and the column associated with the one of the plurality oftiles in the tiled image data; when there are none of the tile recordsat the row and the column of the lookup table, storing a null value inthe lookup table at the row and the column; when there are none of thetile records in a lookup table row in the lookup table, omitting thelookup table row from the lookup table; creating a row index file havingindices into the lookup table, and having a null value for each of theomitted lookup table rows; and retrieving an address for a specific tileby executing seeking to a row position of the row associated with thetile record in the row index file; reading a row index value at the rowposition in the row index file; positioning the lookup table accordingto the row index value if the value is non-null; seeking to a columnposition for the column associated with the tile record; reading anaddress associated with the tile record; and retrieving one of theplurality of tiles associated with the tile record at the address. 2.The method as in claim 1 further comprising: creating the tile recordbased on a sentinel value, a tile address, a tile size, and a tiledimage.
 3. The method as in claim 1 further comprising: computing theaddress based on a column index, a row index, and a number of columns.4. A system for storing and retrieving tiled image data comprises: atile record processor executing, for each of a plurality of tiles at apre-selected zoom level from the tiled image data, the step of storingtile record in a tiled image file, the tile record being associated withone of the plurality of tiles, the tile record being associated with arow and a column; a lookup table processor creating a lookup tablehaving a direct-lookup value for the tile record at the row and thecolumn associated with one of the plurality of tiles in the tiled imagedata, when there are none of the tile records at the row and the columnof the lookup table, storing a null value in the lookup table at the rowand the column, and when there are none of the tile records in the rowin the lookup table, omitting the row from the lookup table; a row indexfile creator creating a row index file having indices into the lookuptable, and having a null value for each of the omitted lookup tablerows; and a tile retriever retrieving an address for a specific tile byexecuting (a) seeking to a row position of the row associated with thetile record in a row index file; (b) reading a row index value at therow position in the row index file; (c) positioning the lookup tableaccording to the row index value if the value is non-null; (d) seekingto a column position for the column associated with tile record; (e)reading an address associated with the tile record; and (f) retrievingone of the plurality of tiles associated with the tile record at theaddress.
 5. The system as in claim 4 wherein the tile record comprises:a sentinel value; a tile address; a tile size; and a tiled image.
 6. Thesystem as in claim 4 wherein said tile record processor computes theaddress based on a column index, a row index, and a number of columns.